home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
qbnws302.zip
/
QBNWS302.NWS
< prev
Wrap
Text File
|
1992-06-29
|
44KB
|
1,160 lines
Volume 3, Number 2 June 29, 1992
**************************************************
* *
* QBNews *
* *
* International QuickBASIC Electronic *
* Newsleter *
* *
* Dedicated to promoting QuickBASIC around *
* the world *
* *
**************************************************
The QBNews is an electronic newsletter published by Clearware
Computing. It can be freely distributed providing NO CHARGE is charged
for distribution. The QBNews is copyrighted in full by Clearware
Computing. The authors hold the copyright to their individual
articles. All program code appearing in QBNews is released into the
public domain. You may do what you wish with the code except
copyright it. QBNews must be distributed whole and unmodified.
You can write The QBNews at:
The QBNews
P.O. Box 507
Sandy Hook, CT 06482
Copyright (c) 1992 by Clearware Computing.
The QBNews Page i
Volume 3, Number 2 June 29, 1992
----------------------------------------------------------------------
T A B L E O F C O N T E N T S
1. From the Editor's Desk
Is this Goodbye? ............................................. 1
2. DataBASICs and File I/O
File Types 100 by Richard Vannoy ............................. 2
Indexing 101 by Richard Vannoy ............................... 5
Hashing-It isn't all Corned Beef by Dave Cleary and Mike Avery 10
Create dBASE III Data Files from QuickBASIC by Dennis Gellert 11
Adding LANtastic Support to your Programs by Chip Morrow ..... 13
A powerful line editor for QB by Larry Stone ................. 15
The QBNews Page ii
Volume 3, Number 2 June 29, 1992
----------------------------------------------------------------------
F r o m t h e E d i t o r ' s D e s k
----------------------------------------------------------------------
Is this Goodbye?
As you may have noticed, this edition of The QBNews is not up to the
usual high standards set by previous issues. The problem is that I am
running out of people who I can hit up for free articles. Most of the
articles that have appeared in The QBNews were because of direct
solicitations from me. This issue relied on on contributions sent in
to me without my asking for them.
For some reason, at least from the mail I have (or have not is more
like it) received, interest seems to be wanning in The QBNews. Because
of this, I have no choice but to suspend offering disk subscriptions
and as of right now, Volume 3 will be the end of The QBNews. The
months that passed since the 301 issue have really been disappointing
as far as response goes. I don't expect this issue to generate much
either because of how poor it is. However, I am committed to
continuing on until 304, and alot can happen in those six months. If
possible, I would like to continue producing The QBNews. However, that
means the term "user supported" will have to take on much more meaning
in the coming months
Dave Cleary - Publisher of The QBNews
The QBNews Page 1
Volume 3, Number 2 June 29, 1992
----------------------------------------------------------------------
D a t a B A S I C s a n d F i l e I / O
----------------------------------------------------------------------
File Types 100 by Richard Vannoy
This article will familiarize beginners to computer programming and
the QuickBASIC programming language with the basics of file creation
and a brief on the types of files generally used in computer programs.
First, we need a few definitions that describe how data is stored.
Definitions:
Field: A particular type of information in a file.
Common field names would be phone number, name,
address, or date.
Record: The sum of the fields for one person, place or
thing.
Field 1: Name: Richard <----- Together, these three
Field 2: Phone: 777-1212 <----- fields make one
Field 3: Birthday: 04\26\60 <----- record.
There are generally three types of files most commonly used today.
They are sequential, random access and binary.
Sequential, as the name implies, means that data is written to the
file in sequence, or one after the other, so if I write the name and
phone numbers of a few friends in a sequential file, it might look
like the line below. (The commas are called delimiters. They are put
in by you or the program to separate each piece of data)
Sam,777-5155,George,123-4567,Bill,323-1212
Notice that all of the information (fields and records) are slammed
together and that there is no way to tell where the name Bill starts
without reading the file from the beginning. To retrieve, or read the
items, we read them from the beginning, sequentially, until we get to
the information desired. If Richard is the 100th name in the list, we
have to READ the first 99 names/phone numbers to get to it.
In a random access file, the fields are defined to a specific length
and any spaces not used are filled with blanks. This allows each
record to be the exact same size. Like..
Name: 10 bytes |Richard |
Phone: 8 bytes |777-1212|
Now we have a record length of 18 bytes, no matter how long the data
is, so lets write the same info as above to a file..
Sam 777-5155George 123-4567Bill 323-1212
| | |
Note how a new record starts every 18 bytes, and that "unused" bytes
in the records are filled with spaces, so we can predict where every
The QBNews Page 2
Volume 3, Number 2 June 29, 1992
record is going to start. And we don't need separaters since we know
exactly where each record and each field starts. Not only that, if we
know that Richard's info is in the 100th record, we can go directly to
it since the record length is constant. Because of this
predictability, which transforms to SPEED when it is time to find
information, random access records are well suited to storing and
retrieving large quantities of data.
These are the two most common storage techniques, but there are many
more! One, called Indexed Sequential Access Method (ISAM) is stored
somewha